//
//  CommonColor.swift
//  YUANSHI
//
//  Created by pro on 2019/12/8.
//  Copyright © 2019 wangbin. All rights reserved.
//

import UIKit

//字体大小
func kFontSize(font:CGFloat) -> UIFont{
    return UIFont.systemFont(ofSize: font)
}


func kRGBA (r:CGFloat, g:CGFloat, b:CGFloat, a:CGFloat) -> UIColor
{
    return UIColor(red: r/255.0, green: g/255.0, blue: b/255.0, alpha: a)
}


extension UIColor{
    //返回随机颜色
    class var randomColor: UIColor {
        
        get{
            let red = CGFloat(arc4random()%256)/255
            let green = CGFloat(arc4random()%256)/255
            let blue = CGFloat(arc4random()%256 )/255
            
            return UIColor(red: red, green: green, blue: blue, alpha: 1)
        }
       
    }
}

let navBgColor = kRGBA(r: 38, g: 168, b: 254, a: 1)

let kLineColor = kRGBA(r: 200, g: 200, b: 200, a: 0.5)

let kTableBgColor = kRGBA(r: 245, g: 245, b: 245, a: 1)

let K999Color = kRGBA(r: 153, g: 153, b: 153, a: 1)

let k666Color = kRGBA(r: 102, g: 102, b: 102, a: 1)

let k333Color = kRGBA(r: 51, g: 51, b: 51, a: 1)

let kredColor = UIColor.color_fromHexColorString("#fe4241")

let kstockGreenColor = UIColor.color_fromHexColorString("#59b35c")

let kstockRedColor = UIColor.color_fromHexColorString("#dd1f48")

let K30995aColor   = UIColor.color_fromHexColorString("#30995a")

let kfc4356Color = UIColor.color_fromHexColorString("#fc4356")

let kf2f2f2Color = UIColor.color_fromHexColorString("#f2f2f2")


let knavmainColor = UIColor.color_fromHexColorString("#5290f4")

//let knavmainColor = kRGBA(r: 69, g: 102, b: 255, a: 1)


